package com.activeMQ;

import java.util.ArrayList;
import java.util.List;

import com.activeMQ.property.Owner;
import com.activeMQ.property.Property;
import com.activeMq.MqBrokerRegBean;

/***
 * 发送信息位于地产
 * 
 * @author shendiao
 * 
 */
public class InitMqBrokerRegBean {

	
	public void initBean() {

		try {

			/***
			 * 添加相关的实例和注册机制
			 */
			List<MqBrokerRegBean> mqBrokerRegBeans = new ArrayList<MqBrokerRegBean>();

			/***
			 * 产权人
			 */

			MqBrokerRegBean property = new MqBrokerRegBean();
			property.setiTopicMsgHandler(new Property());
			property.setRegister("RECEIVER.PROPERTY");
			property.setTopicName("PROPINFO.PROPERTY");

			mqBrokerRegBeans.add(property);

			/***
			 * 户主
			 */

			MqBrokerRegBean owner = new MqBrokerRegBean();
			owner.setiTopicMsgHandler(new Owner());
			owner.setRegister("RECEIVER.OWNER");
			owner.setTopicName("PROPINFO.OWNER");

			mqBrokerRegBeans.add(owner);

			/***
			 * 初始化相关的配置消息发送的配置信息
			 */
			/*InitActiveMq.startTopic(mqBrokerRegBeans,
					ActiveUrlPath.conPath(ProConfig.getProValues("ACTMQURL")));*/

		} catch (Exception e) {
			// TODO: handle exception
		}

	}
}
